package javax.microedition.lcdui;

public abstract class Canvas extends Displayable {
  public Graphics CurGraphics;
  public static final int UP = 1;

  public static final int GAME_B = 10;

  public static final int GAME_C = 11;

  public static final int GAME_D = 12;

  public static final int LEFT = 2;

  public static final int KEY_POUND = 35;

  public static final int KEY_STAR = 42;

  public static final int KEY_NUM0 = 48;

  public static final int KEY_NUM1 = 49;

  public static final int RIGHT = 5;

  public static final int KEY_NUM2 = 50;

  public static final int KEY_NUM3 = 51;

  public static final int KEY_NUM4 = 52;

  public static final int KEY_NUM5 = 53;

  public static final int KEY_NUM6 = 54;

  public static final int KEY_NUM7 = 55;

  public static final int KEY_NUM8 = 56;

  public static final int KEY_NUM9 = 57;

  public static final int DOWN = 6;

  public static final int FIRE = 8;

  public static final int GAME_A = 9;

  protected int m_keyStates;

  protected abstract void paint(Graphics paramGraphics);

  public Canvas() {
    Graphics.Init();
  }

  protected void hideNotify() {
  }

  protected void keyPressed(int paramInt) {
  }

  protected void keyReleased(int paramInt) {
  }

  protected void keyRepeated(int paramInt) {
  }

  protected void pointerDragged(int paramInt1, int paramInt2) {
  }

  protected void pointerPressed(int paramInt1, int paramInt2) {
  }

  protected void pointerReleased(int paramInt1, int paramInt2) {
  }

  protected void showNotify() {
  }

  public boolean hasPointerEvents() {
    return false;
  }

  public boolean hasPointerMotionEvents() {
    return false;
  }

  public boolean hasRepeatEvents() {
    return false;
  }

  public boolean isDoubleBuffered() {
    return false;
  }

  public final void repaint() {
    repaint(0, 0, getWidth(), getHeight());
  }

  public native void Repaint(int paramInt1, int paramInt2, int paramInt3, int paramInt4);

  public boolean Init;

  public final void repaint(int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
    Repaint(paramInt1, paramInt2, paramInt3, paramInt4);
    paint(Graphics.CurrentGraphics);
    Init = true;
  }

  public final void serviceRepaints() {
  }

  public native int GetGameAction(int paramInt);

  public int getGameAction(int i) {
    switch (i) {
      case 49:
        return 9;
      case 50:
      case 52:
      case 53:
      case 54:
      case 56:
      default:
        if (i == 50) {
          return 1;
        }
        if (i == 56) {
          return 6;
        }
        if (i == 52) {
          return 2;
        }
        if (i == 54) {
          return 5;
        }
        return (i == 53) ? 8 : 0;
      case 51:
        return 10;
      case 55:
        return 11;
      case 57:
        return 12;
    }

  }

  public int getKeyCode(int i) {
    switch (i) {
      case 1:
        return 1;
      case 2:
        return 2;
      case 3:
      case 4:
      case 7:
      default:
        return 0;
      case 5:
        return 5;
      case 6:
        return 6;
      case 8:
        return 8;
      case 9:
        return 49;
      case 10:
        return 51;
      case 11:
        return 55;
      case 12:
        return 57;
    }
  }

  public native String GetKeyName(int paramInt);

  public String getKeyName(int paramInt) {

    return GetKeyName(paramInt);
  }

  public void setFullScreenMode(boolean paramBoolean) {
  }

  public void run(Thread t) {
    t.run();
  }
}

/*
 * Location:
 * C:\Java\rt\javax\microedition\midp_2.1.jar!\javax\microedition\lcdui\Canvas.
 * class
 * Java compiler version: 3 (47.0)
 * JD-Core Version: 1.1.3
 */